<link href="../Public/css/slideshow.css" rel="stylesheet" />
<link href="../Public/css/style_forum.css" rel="stylesheet" />
<style type="text/css">
   #li1{position: relative; z-index:99}
    .B li{float: left;position: relative;}
    #C{clear: both;position: relative; left:25px; width:102px; z-index:99; background:#F1F1F1;}
    #C a{color: black;padding: 8px;display:none;}
    #li1:hover a{display: block;}

</style>

<script>

 function zhuzi_for(){
            var contnet=$('#search_for').val();
         
              if(contnet){

                  return true;
              }else{
                  alert('请输入您要搜索的内容');
                  return false;
               }

	  }

</script>
<div class="wind_alldivs1" style=" height:1800px;">
  <div class="auto">
              <div class="subnav">
                    <ul class="crumbs" style="">
                        <li>我的位置：</li>
                        <li><a href="{$site_url}">{$site_name} </a> </li>
                        <li>&nbsp; &gt; <a href="/index.php?m=Zforum_theme&amp;a=index&amp;id=7">论坛 </a></li>
                        <li>&nbsp; &gt;搜索</li>
                        
                        <div class="clear"></div>
                    </ul>
                 
              </div>
     {if $plate}         
      <div class="listtop">
         <div class="listtitle" style="padding-top:20px;">
           <img width="65" height="65" style="float:left; "  src="{$plate['icon']}"/>
             <span style="font-size:18px; font-weight:bold; margin-left:20px; color:#604328">{$plate['name']}</span> 
             <div style=" font-size:14px;float:right; margin-right:20px;">
              帖子:<span style="color:#F00"> {$plate['num']}</span>
             </div>
             <div style=" font-size:14px;float:right; margin-right:60px;">
             <?php $date=date('Y-m-d');
                   $num=M('Zforum_record')->where("date='".$date."' and plateid=".$plateid)->find();?>
             
              今日:<span style="color:#F00"> {if $num}{$num['num']} {else}0{/if} </span>
             </div>
         </div>
         <div style=" margin-left:150px">{$plate['explain']}</div>
      </div>  
    {/if}
      <div class="list_left">
         
          
               <div class="pla_title"  style="margin-top:20px;">&nbsp;&nbsp;&nbsp;搜索结果</div>  
                <div class="tiezi">
                {if $list}
                <volist name="list" id="r">
                 <ul style="margin-top:10px;" >
                    <li class="posli">
                      {php $user=M('User')->where('id='.$r['userid'])->find();}
                       <div style="float:left"><a href="index.php?m=User&a=index&id={$r['userid']}"><img width="96" height="96" src="{$user['avatar']}" /></a></div>
                       <div style="float:left; margin-left:20px;">
                          <ul>
                            <li style="height:30px;line-height:30px; font-size:14px">
                                <a target="_blank" href="index.php?g=Home&m=Zforum_reply&a=index&id={$r['id']}&plateid={$plate['id']}" style="color:#000; font-weight:bold; font-size:14px;"> <span style="color:#ff9000">
                                </span>{$r['title']}
                                </a>&nbsp;
                                {if $r['essence']==1 } <img  src="../Public/images/jinghua_1.gif" />{/if}
                                <if condition="$r['posid']!=0"><img src="./Public/Images/admin_elite.gif"></if> 
                            </li>
                            <li style="height:40px;line-height:40px;">{$r['username']}&nbsp;&nbsp;|&nbsp;&nbsp;{$r['createtime']|remianday=###}</li>
                            
                            <li style="height:40px; line-height:40px; width:700px;" class="ccd">
                              <a class="wind_tiezia1">&nbsp;&nbsp;{$r['hits']}</a>
                             <!-- <a class="wind_tiezia2">&nbsp;{$r['like_num']}</a>-->
                              <a class="wind_tiezia3">&nbsp;<span id="keep_n45">{$r['reply_num']}</span></a>
                              {php $user=M('zforum_reply')->where('theme_id='.$r['id'])->limit(1)->order("createtime desc")->select();}
                              {if $user}
                              <span style=" float:right; margin-right:10px;" name="{user[0]['username']}">最后回复{$user[0]['username']}  {$user[0]['createtime']|remianday=###} </span>{/if}
                             </li>
                          </ul>
                       </div>
                     </li> 
               </ul>
              </volist> 
               {else}
                  <div style="width:100%; height:300px; text-align:center; font-size:24px; color:#F00;">对不起，没有找到：{$keyword}的相关结果</div>
               {/if}
               
               
               
               
              
              </div>
<style>

.paging1 { width:420px; margin:0 auto;}

.paging1 .current a{ color:#fff;}

.paging1 .next { float:left; width:62px; line-height:26px; text-align: center; }/*下一页*/

.paging1  a{display: inline-block; margin:2px;  width:28px; height:26px; line-height: 26px; }
.paging1  a:hover{ color:#fff; background: #604328}
</style>
        
            <ul class="paging1" style=" height:30px; margin-top:20px; text-align:center">
                <ul>
               {$pages}
               </ul>
            </ul>
        
        </div>
           
     
     
      
     
      
      
     <!-- 右边-->
      <div class="list_right">
         
  <script type="text/javascript">
  function fabu(){
	  //alert(document.getElementsByTagName('BODY')[0].scrollHeight);
	  document.getElementsByTagName('BODY')[0].scrollTop=1800;
	   }
  
  </script>       
       <!--  板块导航-->
       
         <div class="plate_nav" style="margin-top:0px;">
             <div style="width:100%; line-height:60px;border-bottom:#999 solid 2px;"> <div style="width:80%; line-height:60px; margin:0 auto; font-size:20px;  color:#4d4d4d;"> 板块导航</div></div>
             <div class="plate_n">
              <ul>
               <YP:list name="Zforum_plate" order="listorder asc" id="r" limit="8">
                <li><p><a href="index.php?g=Home&m=Zforum_theme&a=forumlist&id=7&plateid={$r[id]}"><img width="40" height="40" src="{$r['icon']}"/></a></p><p style="margin-top:10px;"><a href="index.php?g=Home&m=Zforum_theme&a=forumlist&id=7&plateid={$r[id]}">{$r['name']}</a></p></li>
               </YP:list>
                
              </ul>
           </div>
          
         </div>
          <!--  板块导航end-->
           <!--热门推荐-->
         <div class="plate_nav">
             <div style="width:100%; line-height:60px;border-bottom:#999 solid 2px;"> <div style="width:80%; line-height:60px; margin:0 auto; font-size:20px;  color:#4d4d4d;"> 热门推荐</div></div>
             <div class="tuijian">
              <ul>
                <YP:list name="Zforum_theme" id="r" order="hits desc" limit="6">
                <li><span><a href="index.php?g=Home&m=Zforum_reply&a=index&id={$r['id']}&plateid={$r['plateid']}">{$r['title']}</a></span><span style="float:right"><?php echo  date(" Y-m-d",$r['createtime'])?></span> </li>
               
                </YP:list>
              </ul>
           </div>
          
         </div>
          <!--热门推荐end--> 
          
          
           <div class="plate_nav" style=" height:800px;">
             <div style="width:100%; line-height:60px;border-bottom:#999 solid 2px;"> <div style="width:80%; line-height:60px; margin:0 auto; font-size:20px;  color:#4d4d4d;"> 设计师推荐</div></div>
             <div class="tuijian_sjs">
              <ul>
                
                
              <?php $result=M('User')->where('pos_hot=1 and groupid=1')->order('pos_time desc')->limit(6)->select();
                foreach($result as $k=>$r){
              ?>
                <li class="sjsss">
                 <a href="index.php?m=User&a=index&id={$r.id}"><img style="float:left" width="85" height="85" src="{$r['avatar']}" /></a>
                   <div style="float:left; margin-left:20px;">
                          <ul>
                            <li style="font-size:14px"> <a href="index.php?m=User&a=index&id={$r.id}">{$r['username']}</a></li>
                            <li style=" height:25px;">作品：{$r['case_num']}</li>
                            <li style=" height:25px;">收藏：{$r['keep_num']}</li>
                            <li style=" height:25px;">帖子 : {$r['theme_num']}</li>
                          </ul>
                       </div>
                
                </li>
               <?php }?> 
                
              </ul>
           </div>
          
         </div>
           
           
           
      </div>
      
   
      </div>
      
      <script>
			var editor;
			KindEditor.ready(function(K) {
				editor = K.create('textarea[name="content"]', {
					allowFileManager : true,
					uploadJson : "index.php?g=User&m=Upload&a=index",//图片上传后的处理地址
					width : '1199px',
					
					items : [
						'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
						'removeformat', '|', 'emoticons', 'image']
				});
				
			});
		</script> 
      <!--编辑器-->
  {if $plate['id']!=8 && $_COOKIE['YP_username']}    
     <div class="main" style="margin-top:20px; ">
     
        <form action="index.php?g=Home&m=Zforum_theme&a=insert" method="post"  >
        <input  type="hidden" name="plateid" value="{$plate['id']}" />
        <div style=" width:100%;  float:left; margin-top:20px; border:#999 solid 1px;">
        <div style="width:1200px;  height:30px; line-height:30px; font-weight:bold; float:left; border-bottom:#cdcdcd solid 1px;">&nbsp;&nbsp;快速发帖</div>
       <div style="width:1200px; margin-top:20px; margin-left:20px; float:left"><input style=" width:30%; height:30px; border:#CCC solid 1px;" id="title"  name="title" placeholder="  标题"/></div>
        <div id="tishi" style="color:#F00; float:left"></div>
         
       <div style=" margin-top:20px; float:left"><textarea id="content1" name="content" style="width:700px;height:200px;visibility:hidden;"></textarea>
       </div>
    </div>
     <div style="width:1200px; height:50px; float:left; margin-top:20px;  "><input style=" float:right; width:100px; height:30px;background:#604328; color:#FFF; border: #FFF solid 0px;" type="submit"  name="" value="发布帖子"/></div>
     </form>
       
</div>
{/if}
{if empty($_COOKIE['YP_username'])}
<div class="main" style="margin-top:20px;">
     
        
        <div style=" width:100%; background:#FFF;  float:left; height:204px; line-height:200px; margin-top:20px; border:#999 solid 1px;">
        <div style=" text-align:center; font-size:16px">
       您需要登录后才可以发帖&nbsp;&nbsp;&nbsp;
       <span ><a style="color:#06F" href="{:URL('User-Login/index')}">登录</a></span>&nbsp;|&nbsp;
       <span ><a style="color:#06F" href="{:URL('User-Register/index')}"/>注册</a></span> 
       </div>
    </div>
   
     
       
</div>

{/if}
      
      <div style="clear:both;"></div>
      <div style="width:100%;height:40px;"></div>
          <!-- end -->
  </div>
  
  <script>
$("#title").keyup(function(){
var title=$("#title").val();

var len = 0; 
for (var i = 0; i < title.length; i++) { 
if (title[i].match(/[^\x00-\xff]/ig) != null) //全角 
len += 2; 
else 
len += 1; 
} 
if(len>48){
	var t=getByteVal(title,60)
	var ll=Math.ceil((60-len)/2);
	$("#title").val(t);
	$("#tishi").html('还可输入'+ll+'个字');
	}else{
		$("#tishi").html(' ');
		}

//do something


function getByteVal(val, max) { 
var returnValue = ''; 
var byteValLen = 0; 
for (var i = 0; i < val.length; i++) { 
if (val[i].match(/[^\x00-\xff]/ig) != null) 
byteValLen += 2; 
else 
byteValLen += 1; 
if (byteValLen > max) 
break; 
returnValue += val[i]; 
} 
return returnValue; 
} 

});
</script>                                                                                                                                                